/* ================= DEPARTMENT SECTION ================= */
.department {
  padding: 60px 20px;
  background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
  font-family: 'Roboto', sans-serif;
  color: #333;
  text-align: center;
  overflow: hidden;
}

/* ================= TITLE CARD ================= */
.department .title-card {
  display: inline-block;
  margin: 0 auto 30px auto;
  padding: 20px 40px;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #0b2e59, #0b6bff);
  background-size: 400% 400%;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  cursor: default;
  opacity: 0;
  transform: translateY(-30px);
  animation: slideFadeIn 1s forwards, gradientShift 6s ease infinite;
  transition: all 0.3s ease;
}

/* Title hover */
.department .title-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, #ff6b6b, #ff8e6b);
}

/* ================= INTRODUCTION ================= */
.department .intro {
  max-width: 800px;
  margin: 0 auto 40px;
  font-size: 16px;
  line-height: 1.6;
  color: #555;
  opacity: 0;
  transform: translateY(20px);
  animation: slideFadeIn 1s forwards;
  animation-delay: 0.6s;
}

.department .intro p:hover {
  color: #0b6bff;
  transition: all 0.3s ease;
}

/* ================= SECTION HEADINGS ================= */
.department .section-heading {
  font-size: 24px;
  color: #0b2e59;
  margin: 40px 0 20px 0;
  text-align: center;
}

/* ================= STAFF CARDS ================= */
.staff {
  display: flex;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}

.staff .card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 300px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.staff .card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.staff .card img {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ================= LAB CARDS ================= */
.labs {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.lab-card {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  width: 350px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.lab-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}

.lab-card img {
  padding: 10px;
  width: 100%;
  border-radius: 10px;
  margin-bottom: 10px;
}

/* ================= GALLERY ================= */
.gallery {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.gallery img {
  width: 300px;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

/* ================= ANIMATIONS ================= */
@keyframes slideFadeIn {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .staff, .labs, .gallery {
    flex-direction: column;
    align-items: center;
  }

  .staff .card, .lab-card, .gallery img {
    width: 90%;
    max-width: 300px;
  }

  .department .title-card {
    font-size: 28px;
    padding: 15px 30px;
  }
}